package com.cyt.sys.model.po;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;


/**
 *@Author: YuShengQiang
 *@Date: 2018-11-16 11:05
 *@Description: 基础部分-附件管理
 */
@Getter
@Setter
@Table(name = "cyt_sys_file")
@NoArgsConstructor
public class SysFile implements Serializable {



    @Id
    private String id;//主键
    /**
     * 附件名称
     */
    @Column(name = "file_name")
    private String fileName;

    /**
     * 附件大小
     */
    @Column(name = "file_size")
    private long fileSize;

    /**
     *扩展名称
     */
    @Column(name = "extend_name")
    private String extendName;

    /**
     * 对象ID（附加所属对象
     */
    @Column(name = "object_id")
    private String objectId;

    /**
     * 存储方式 1、本地存储，2、网盘存储，3、自定义配置
     */
    @Column(name = "storage_type")
    private String storageType;

    /**
     * 存储路径
     */
    @Column(name = "path")
    private String path;

    /**
     * 所属类型
     */
    @Column(name = "type")
    private String type;

    /**
     * 上传人
     */
    @Column(name = "creator_id")
    private String creatorId;

    /**
     * 删除标识：1、正常，2、已删除
     */
    @Column(name = "remove_tag")
    private String removeTag;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    public SysFile(String objectId, String removeTag) {
        this.objectId = objectId;
        this.removeTag = removeTag;
    }
}